package structural.decorator;

/**
 * @ClassName: ConcreteDecoratorB
 * @Description: 具体装饰器类B
 * @Author: liu-hao
 * @Date: 2023-04-12 17:58
 * @Version: 1.0
 **/
public class ConcreteDecoratorB extends Decorator {
    public ConcreteDecoratorB(Component component) {
        super(component);
    }

    @Override
    public void operation() {
        super.operation();
        addedBehavior();
    }

    private void addedBehavior() {
        System.out.println("为具体组件B增加额外的操作");
    }
}